#  SPDX-License-Identifier: Apache-2.0

try:
    import pandas

    # print(pandas.read_csv('commissions.csv').to_dict())
    default_commissions = pandas.DataFrame(
        {
            "product_id": {
                0: "AL",
                1: "SN",
                2: "RU",
                3: "WR",
                4: "RB",
                5: "FU",
                6: "AU",
                7: "CU",
                8: "AG",
                9: "PB",
                10: "NI",
                11: "HC",
                12: "ZN",
                13: "BU",
                14: "SC",
                15: "P",
                16: "BB",
                17: "JD",
                18: "J",
                19: "L",
                20: "PP",
                21: "I",
                22: "M",
                23: "C",
                24: "JM",
                25: "FB",
                26: "CS",
                27: "A",
                28: "B",
                29: "V",
                30: "Y",
                31: "EG",
                32: "SM",
                33: "SR",
                34: "RM",
                35: "RS",
                36: "RI",
                37: "TA",
                38: "ZC",
                39: "LR",
                40: "MA",
                41: "JR",
                42: "SF",
                43: "OI",
                44: "CF",
                45: "FG",
                46: "PM",
                47: "WH",
                48: "CY",
                49: "AP",
                50: "IF",
                51: "IC",
                52: "IH",
                53: "TF",
                54: "T",
                55: "TS",
            },
            "exchange_id": {
                0: "SHFE",
                1: "SHFE",
                2: "SHFE",
                3: "SHFE",
                4: "SHFE",
                5: "SHFE",
                6: "SHFE",
                7: "SHFE",
                8: "SHFE",
                9: "SHFE",
                10: "SHFE",
                11: "SHFE",
                12: "SHFE",
                13: "SHFE",
                14: "SHFE",
                15: "DCE",
                16: "DCE",
                17: "DCE",
                18: "DCE",
                19: "DCE",
                20: "DCE",
                21: "DCE",
                22: "DCE",
                23: "DCE",
                24: "DCE",
                25: "DCE",
                26: "DCE",
                27: "DCE",
                28: "DCE",
                29: "DCE",
                30: "DCE",
                31: "DCE",
                32: "CZCE",
                33: "CZCE",
                34: "CZCE",
                35: "CZCE",
                36: "CZCE",
                37: "CZCE",
                38: "CZCE",
                39: "CZCE",
                40: "CZCE",
                41: "CZCE",
                42: "CZCE",
                43: "CZCE",
                44: "CZCE",
                45: "CZCE",
                46: "CZCE",
                47: "CZCE",
                48: "CZCE",
                49: "CZCE",
                50: "CFFEX",
                51: "CFFEX",
                52: "CFFEX",
                53: "CFFEX",
                54: "CFFEX",
                55: "CFFEX",
            },
            "mode": {
                0: 1,
                1: 1,
                2: 0,
                3: 0,
                4: 0,
                5: 0,
                6: 1,
                7: 0,
                8: 0,
                9: 0,
                10: 1,
                11: 0,
                12: 1,
                13: 0,
                14: 1,
                15: 1,
                16: 0,
                17: 0,
                18: 0,
                19: 1,
                20: 0,
                21: 0,
                22: 1,
                23: 1,
                24: 0,
                25: 0,
                26: 1,
                27: 1,
                28: 1,
                29: 1,
                30: 1,
                31: 1,
                32: 1,
                33: 1,
                34: 1,
                35: 1,
                36: 1,
                37: 1,
                38: 1,
                39: 1,
                40: 1,
                41: 1,
                42: 1,
                43: 1,
                44: 1,
                45: 1,
                46: 1,
                47: 1,
                48: 1,
                49: 1,
                50: 0,
                51: 0,
                52: 0,
                53: 1,
                54: 1,
                55: 1,
            },
            "open_ratio": {
                0: 3.0,
                1: 3.0,
                2: 0.00045,
                3: 4e-05,
                4: 4.5e-05,
                5: 2e-05,
                6: 10.0,
                7: 2.5e-05,
                8: 5e-05,
                9: 4e-05,
                10: 6.0,
                11: 4e-05,
                12: 3.0,
                13: 5e-05,
                14: 20.0,
                15: 2.5,
                16: 0.0001,
                17: 0.00015,
                18: 6e-05,
                19: 2.0,
                20: 5e-05,
                21: 6e-05,
                22: 1.5,
                23: 1.2,
                24: 6e-05,
                25: 0.0001,
                26: 1.5,
                27: 2.0,
                28: 2.0,
                29: 2.0,
                30: 2.5,
                31: 4.0,
                32: 3.0,
                33: 3.0,
                34: 1.5,
                35: 2.0,
                36: 2.5,
                37: 3.0,
                38: 4.0,
                39: 3.0,
                40: 1.4,
                41: 3.0,
                42: 3.0,
                43: 2.5,
                44: 4.3,
                45: 3.0,
                46: 5.0,
                47: 2.5,
                48: 4.0,
                49: 1.5,
                50: 2.3e-05,
                51: 2.3e-05,
                52: 2.3e-05,
                53: 3.0,
                54: 3.0,
                55: 8.0,
            },
            "close_ratio": {
                0: 3.0,
                1: 3.0,
                2: 0.00045,
                3: 4e-05,
                4: 4.5e-05,
                5: 2e-05,
                6: 10.0,
                7: 2.5e-05,
                8: 5e-05,
                9: 4e-05,
                10: 6.0,
                11: 4e-05,
                12: 3.0,
                13: 5e-05,
                14: 20.0,
                15: 2.5,
                16: 0.0001,
                17: 0.00015,
                18: 6e-05,
                19: 2.0,
                20: 5e-05,
                21: 6e-05,
                22: 1.5,
                23: 1.2,
                24: 6e-05,
                25: 0.0001,
                26: 1.5,
                27: 2.0,
                28: 2.0,
                29: 2.0,
                30: 2.5,
                31: 4.0,
                32: 3.0,
                33: 3.0,
                34: 1.5,
                35: 2.0,
                36: 2.5,
                37: 3.0,
                38: 4.0,
                39: 3.0,
                40: 1.4,
                41: 3.0,
                42: 3.0,
                43: 2.5,
                44: 4.3,
                45: 3.0,
                46: 5.0,
                47: 2.5,
                48: 4.0,
                49: 1.5,
                50: 2.3e-05,
                51: 2.3e-05,
                52: 2.3e-05,
                53: 3.0,
                54: 3.0,
                55: 8.0,
            },
            "close_today_ratio": {
                0: 0.0,
                1: 0.0,
                2: 0.00045,
                3: 4e-05,
                4: 0.0,
                5: 2e-05,
                6: 0.0,
                7: 0.0,
                8: 0.0,
                9: 0.0,
                10: 0.0,
                11: 0.0,
                12: 0.0,
                13: 0.0,
                14: 0.0,
                15: 0.0,
                16: 5e-05,
                17: 0.00015,
                18: 3e-05,
                19: 0.0,
                20: 0.00025,
                21: 3e-05,
                22: 0.0,
                23: 0.0,
                24: 3e-05,
                25: 5e-05,
                26: 0.0,
                27: 0.0,
                28: 2.0,
                29: 0.0,
                30: 0.0,
                31: 0.0,
                32: 0.0,
                33: 0.0,
                34: 0.0,
                35: 0.0,
                36: 2.5,
                37: 3.0,
                38: 0.0,
                39: 0.0,
                40: 0.0,
                41: 3.0,
                42: 0.0,
                43: 0.0,
                44: 0.0,
                45: 0.0,
                46: 5.0,
                47: 0.0,
                48: 0.0,
                49: 0.0,
                50: 0.0023,
                51: 0.0023,
                52: 0.0023,
                53: 0.0,
                54: 0.0,
                55: 0.0,
            },
            "instrument_type": {
                0: 2,
                1: 2,
                2: 2,
                3: 2,
                4: 2,
                5: 2,
                6: 2,
                7: 2,
                8: 2,
                9: 2,
                10: 2,
                11: 2,
                12: 2,
                13: 2,
                14: 2,
                15: 2,
                16: 2,
                17: 2,
                18: 2,
                19: 2,
                20: 2,
                21: 2,
                22: 2,
                23: 2,
                24: 2,
                25: 2,
                26: 2,
                27: 2,
                28: 2,
                29: 2,
                30: 2,
                31: 2,
                32: 2,
                33: 2,
                34: 2,
                35: 2,
                36: 2,
                37: 2,
                38: 2,
                39: 2,
                40: 2,
                41: 2,
                42: 2,
                43: 2,
                44: 2,
                45: 2,
                46: 2,
                47: 2,
                48: 2,
                49: 2,
                50: 2,
                51: 2,
                52: 2,
                53: 2,
                54: 2,
                55: 2,
            },
            "min_commission": {
                0: 5,
                1: 5,
                2: 5,
                3: 5,
                4: 5,
                5: 5,
                6: 5,
                7: 5,
                8: 5,
                9: 5,
                10: 5,
                11: 5,
                12: 5,
                13: 5,
                14: 5,
                15: 5,
                16: 5,
                17: 5,
                18: 5,
                19: 5,
                20: 5,
                21: 5,
                22: 5,
                23: 5,
                24: 5,
                25: 5,
                26: 5,
                27: 5,
                28: 5,
                29: 5,
                30: 5,
                31: 5,
                32: 5,
                33: 5,
                34: 5,
                35: 5,
                36: 5,
                37: 5,
                38: 5,
                39: 5,
                40: 5,
                41: 5,
                42: 5,
                43: 5,
                44: 5,
                45: 5,
                46: 5,
                47: 5,
                48: 5,
                49: 5,
                50: 5,
                51: 5,
                52: 5,
                53: 5,
                54: 5,
                55: 5,
            },
        }
    )
except ImportError:
    default_commissions = {}
    print("failed to load default_commissions")
